package com.party.core.service.analysis.impl;

import com.party.common.paging.Page;
import com.party.core.dao.read.analysis.StatisticsFunnelCountReadDao;
import com.party.core.dao.write.analysis.StatisticsFunnelCountWriteDao;
import com.party.core.model.BaseModel;
import com.party.core.model.analysis.StatisticsFunnelCounter;
import com.party.core.service.analysis.IStatisticsFunnelCountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @program: party-temp
 * @description: 统计事件流程接口实现
 * @author: Huaqunhao
 * @create: 2018-08-01 11:57
 **/

@Service
public class StatisticsFunnelCountService implements IStatisticsFunnelCountService {

    @Autowired
    private StatisticsFunnelCountWriteDao statisticsFunnelCountWriteDao;
    @Autowired
    private StatisticsFunnelCountReadDao statisticsFunnelCountReadDao;

    @Override
    public boolean batchInsert(List<StatisticsFunnelCounter> funnelCounterList) {
        return false;
    }

    @Override
    public List<StatisticsFunnelCounter> listPageByOthers(StatisticsFunnelCounter funnelCounter, Map<String, Object> params, Page page) {
        return statisticsFunnelCountReadDao.listPageByOthers(funnelCounter, params, page);

    }

    @Override
    public List<StatisticsFunnelCounter> findByFunnelFlowId(Map<String, Object> params) {
        return statisticsFunnelCountReadDao.findByFunnelFlowId(params);
    }

    @Override
    public StatisticsFunnelCounter getUnique(StatisticsFunnelCounter counter) {
        return statisticsFunnelCountReadDao.getUnique(counter);
    }

    @Override
    public String insert(StatisticsFunnelCounter funnelCounter) {
        BaseModel.preInsert(funnelCounter);
        return statisticsFunnelCountWriteDao.insert(funnelCounter) ? funnelCounter.getId() : null;
    }

    @Override
    public boolean update(StatisticsFunnelCounter funnelCounter) {
        return statisticsFunnelCountWriteDao.update(funnelCounter);
    }

    @Override
    public boolean deleteLogic(String id) {
        return statisticsFunnelCountWriteDao.deleteLogic(id);
    }

    @Override
    public boolean delete(String id) {
        return statisticsFunnelCountWriteDao.delete(id);
    }

    @Override
    public boolean batchDeleteLogic(Set<String> ids) {
        return statisticsFunnelCountWriteDao.batchDeleteLogic(ids);
    }

    @Override
    public boolean batchDelete(Set<String> ids) {
        return statisticsFunnelCountWriteDao.batchDelete(ids);
    }

    @Override
    public StatisticsFunnelCounter get(String id) {
        return null;
    }

    @Override
    public List<StatisticsFunnelCounter> listPage(StatisticsFunnelCounter funnelCounter, Page page) {
        return null;
    }

    @Override
    public List<StatisticsFunnelCounter> list(StatisticsFunnelCounter funnelCounter) {
        return null;
    }

    @Override
    public List<StatisticsFunnelCounter> batchList(Set<String> ids, StatisticsFunnelCounter funnelCounter, Page page) {
        return null;
    }
}
